﻿CREATE TABLE [dbo].[MedLabItem]
(
	[Id] INT NOT NULL PRIMARY KEY IDENTITY, 
    [MedLabId] INT NOT NULL, 
    [LabNo] NVARCHAR(50) NULL, 
    [ReportDate] NVARCHAR(50) NULL, 
    [LabName] NVARCHAR(50) NULL, 
    [LabItemNo] NVARCHAR(50) NULL, 
    [LabItemName] NVARCHAR(50) NULL, 
    [Result] NVARCHAR(50) NULL, 
    [Unit] NVARCHAR(50) NULL, 
    [LabInd] NVARCHAR(50) NULL, 
    [LabContext] NVARCHAR(50) NULL 
)

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'主键，自增长',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'Id'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'所属检验单Id',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'MedLabId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'检验单号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'LabNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'报告时间',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'ReportDate'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'检验名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = 'LabName'
GO

GO

EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'序号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'LabItemNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'LabItemName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'结果',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'Result'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'单位',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = 'Unit'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'判断 H:偏高  L:偏低 N:正常',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'LabInd'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'参考值',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'MedLabItem',
    @level2type = N'COLUMN',
    @level2name = N'LabContext'